########### header and bottom
snippet code
# coding: utf-8
endsnippet

snippet main
if __name__ == '__main__':
    ${1}
endsnippet

########### import
snippet im
import ${1}
endsnippet

snippet imp "imp"
import ${1:module}
${2}
endsnippet

snippet fim
from ${1} import ${2}
endsnippet

snippet fro "fro"
from ${1:package} import ${2:module}
${3}
endsnippet

snippet from
from ${1} import ${2}
endsnippet

########### single char
snippet t
True${1}
endsnippet

snippet f
False${1}
endsnippet

snippet n
None${1}
endsnippet

snippet r
return ${1}
endsnippet

snippet s
self.${1}
endsnippet

snippet p
print ${1}
endsnippet

snippet pr
print "${1}"
endsnippet

snippet pri
print '${1}'
endsnippet

snippet prt
print "TRACK ================= ${1}", ${2}
endsnippet

snippet rep
repr(${1})
endsnippet

snippet repr
repr(${1})
endsnippet

snippet _
__${1:init}__${2}
endsnippet

snippet #
# ${1}
endsnippet

snippet a
assert ${1}
endsnippet

snippet isi
isinstance(${1}, ${2})
endsnippet

############# 逻辑控制
snippet el
else:
    ${0:# TODO}
endsnippet

snippet ei
elif ${1}:
    ${2}
endsnippet

snippet while
while ${1:expression}:
    ${0:# TODO}
endsnippet

#############
#snippet def "def"
#def ${1:fname}(${2:`!v indent('.') ? 'self' : ''`}):
#    """${3:docstring for $1}"""
#    ${4:pass}
#endsnippet

snippet defs "defs"
def ${1:fname}(self, ${2:**kwargs}):
    """${3:docstring for $1}"""
    ${3:pass}
endsnippet
snippet pro
def ${1}():
    doc = "${2: The $1 property.}"
    def fget(self):
        ${3:return self._$1}
    def fset(self, value):
        ${4:self._$1 = value}
    def fdel(self):
        ${5:del self._$1}
    return locals()
$1 = property(**$1())
endsnippet

snippet init "init"
def __init__(self, ${1:args}):
    ${2}
endsnippet

snippet doc
"""
@Author: ${1:`wklken`}
@Email: ${2:`wklken@yeah.net`}
@Date: ${3}
@Desc: ${4}
"""
endsnippet

snippet rai
raise ${1}
endsnippet

snippet tr
import traceback; traceback.print_exc()
endsnippet
#############
